package coderead.maven.job.control;

import coderead.maven.job.scheduled.ClassIndexJob;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ZZQ
 * @date 2025
 */
@Controller
@RequiredArgsConstructor
@RequestMapping("/api")
public class JobControl {

    private final ClassIndexJob manager;

    @RequestMapping("/job/info")
    @ResponseBody
    public String getTaskInfo() {
        return manager.getTaskInfo();
    }
}
